package com.liang.advise;

import org.aspectj.lang.ProceedingJoinPoint;

//通知 增强类
public class MyAdvise {
    public void before() {
        System.out.println("前置通知...");
    }

    public void around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("环绕通知之前...");
        Object proceed = point.proceed();
        System.out.println("环绕通知之后...");
    }

    public void after_returning() {
        System.out.println("后置通知...目标对象调用之后执行，发生异常不会执行");
    }

    public void after_throwing() {
        System.out.println("异常通知...发生异常时执行");
    }
    public void after() {
        System.out.println("后置通知...无论是否发生异常都会执行");
    }

}
